﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace PowerApp
{
    public partial class BigMsgBox : Form
    {
        public BigMsgBox()
        {
            InitializeComponent();
        }

        public static DialogResult Show(string msg, string title, MessageBoxButtons buttons)
        {
            BigMsgBox mb = new BigMsgBox();

            mb.label1.Text = title;
            mb.label2.Text = msg;

            if(buttons == MessageBoxButtons.OK)
            {
                mb.cancelbutton2.Visible = false;
                mb.tableLayoutPanel1.SetColumnSpan(mb.okbutton1, 2);
            }
            else
            {
                mb.cancelbutton2.Visible = true;
            }

            return mb.ShowDialog();
        }
    }
}
